package fr.syntheses.blog.Service.convertors;

import java.sql.Timestamp;
import java.text.DateFormat;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;

public class DateConvertor {
	
	Timestamp t;
	
	DateFormat formatter;
	
	public Timestamp stringToTimeStamp(String maDate) throws ParseException {
		
		formatter = new SimpleDateFormat("dd/mm/yyyy");
		
		Date date = (Date)formatter.parse(maDate);
		
		t =  new Timestamp(date.getTime());
		
		return t;
	}

}
